<!--
 * @Author: hejianbo
 * @Date: 2024-06-16 10:00:22
 * @LastEditors: hejianbo
 * @FilePath: /src/views/index.vue
 * @Description: 
-->
<template>
  <div>首页, 欢迎 {{ $store.state.userInfo && $store.state.userInfo.name }}
    <button @click="handleLogout">退出</button>
  </div>
</template>
<script>
export default {
  name: "",
  components: {},
  props: {},
  data() {
   return {

   }
  },
  created() {},
  mounted() {},
  watch: {},
  computed: {},
  methods: {
    handleLogout() {
      this.$store.dispatch("LogOut").then(() => {
        this.$router.replace('/login')
      })
    }
  },
}
</script>
<style>
</style>
